from rest_framework import serializers
from .models import Classification, Category


class ClassifySerializer(serializers.ModelSerializer):
    class Meta:
        model = Classification
        fields = ['id', 'name', 'img']


class CategorySerializer(serializers.ModelSerializer):
    class Meta:
        model = Category
        fields = ['id', 'name', 'img', 'parent']
